package com.example.xunua_zhinengjiaotong.Dialog;

import android.app.AlertDialog;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.Spinner;

import com.example.xunua_zhinengjiaotong.R;


public class CarSpeedDialog2 extends AlertDialog{
    private Context context;
    private Spinner spinner;

    public CarSpeedDialog2(Context context) {
        super(context,R.style.myDialog);
        this.context=context;
    }

    protected CarSpeedDialog2(Context context, boolean cancelable, OnCancelListener cancelListener) {
        super(context, cancelable, cancelListener);
    }

    protected CarSpeedDialog2(Context context, int themeResId) {
        super(context, themeResId);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.item_dialog_car_speed2);
        initView();
    }

    private void initView() {
       spinner = findViewById(R.id.trolley_dialog2_spinner);
       spinner.setAdapter(new ArrayAdapter<>(context, R.layout.support_simple_spinner_dropdown_item,
               new String[]{"一号小车", "二号小车", "三号小车", "四号小车"}));
    }

}
